package abg.core.service.sys;


import abg.core.domain.db.SysUser;
import abg.core.domain.search.Psh;
import abg.core.domain.sys.UserTokenVo;
import abg.core.domain.wx.WxtMpLoginParam;
import com.mybatisflex.core.paginate.Page;

/**
 * 用户服务
 */
public interface SysUserService {

    /**
     * 新增用户
     */
    boolean insert(SysUser param);

    boolean delete(String ids);

    /**
     * 修改
     */
    boolean update(SysUser param);

    /**
     * 查询集合
     */
    Page<SysUser> page(SysUser param, Psh psh);

    /**
     * 给用户分配角色
     */
    void insertUserRole(String userId, String roleIds);

    /**
     * 注册用户
     *
     * @param type 电话1；邮件2
     */
    boolean sysUserRegister(String type, String phone, String email, String password, String password2, String captcha);

    boolean resetUserPassword(String userIds, String newPassword);

    UserTokenVo refreshToken(String refreshToken);

    SysUser appUserInfo();

    SysUser systemUserInfo();

    boolean resetMyPassword(String oldPassword, String newPassword);

    UserTokenVo createUserToken(String userId);

    SysUser updateUserInfo(SysUser param);

    boolean isBindCard();

    boolean bindCard(String idCardName, String idCardNumber);

    boolean accountIsRoot(String account);
}
